;;;;
;;;;
;;;;	Author:
;;;;		Henry C. Francis
;;;;		425 N. Ashe Street
;;;;		Southern Pines, NC 28387
;;;;
;;;	http://www.paracadd.com
;;;;	All rights reserved.
;;;;
(DEFUN C:DIMSTD ()
;;;;  (if (eq(getvar "tilemode")1)
;;;;    (setvar "dimscale" 40)
;;;;  )
  (if dimscl nil (load "dimscl"))
  (if (eq(getvar"dimscale")0)
    (setq dimsc 0)
    (dimscl)
  )
  (if (not (setq dimdef (tblsearch "DIMSTYLE" "STANDARD")))
        (command  ".dim"
                  "dimblk"  "dimaro"
                  "dimldrblk" "dimaro"
                  "dimasz"  "0.125"
;;;                  "dimscale" dimsc
                  "dimgap"  "0.016667"
                  "dimdli"  "0.375"
                  "dimexe"  "0.0625"
                  "dimexo"  "0.0625"
                  "dimpost" "."
                  "dimlfac" "1.0"
                  "dimsoxd" "0"
                  "dimtix"  "0"
                  "dimtih"  "0"
                  "dimtoh"  "0"
                  "dimtad"  "0"
                  "dimtofl" "1"
                  "dimtvp"  "1.25"
                  "dimaso"  "1"
                  "dimclrd" "BYBLOCK"
                  "dimclrt" "3"
                  "dimclre" "BYBLOCK"
                  "dimsho"  "1"
		  "dimtxsty" "STANDARD"
		  "sav"
                  "STANDARD"
		  "exit"
        )
        (if
          (and
              (or
                (equal(cdr(assoc 5 dimdef)) "dimaro")
                (equal(cdr(assoc 5 dimdef)) "DIMARO")
              )
              (equal(cdr(assoc 41 dimdef)) 0.125 3)
              (equal(cdr(assoc 147 dimdef)) 0.016667 6)
              (equal(cdr(assoc 43 dimdef)) 0.375 3)
              (equal(cdr(assoc 44 dimdef)) 0.0625 4)
              (equal(cdr(assoc 42 dimdef)) 0.0625 4)
              (equal(cdr(assoc 144 dimdef)) 1.0 1)
              (equal(cdr(assoc 175 dimdef)) 0)
              (equal(cdr(assoc 174 dimdef)) 0)
              (equal(cdr(assoc 73 dimdef)) 0)
              (equal(cdr(assoc 74 dimdef)) 0)
              (equal(cdr(assoc 77 dimdef)) 0)
              (equal(cdr(assoc 172 dimdef)) 1)
              (equal(cdr(assoc 145 dimdef)) 1.25 2)
              (equal(cdr(assoc 176 dimdef)) 1)
              (equal(cdr(assoc 178 dimdef)) 2)
              (equal(cdr(assoc 177 dimdef)) 1)
	      (equal(cdr(assoc 2(entget(cdr(assoc 340 (tblsearch "DIMSTYLE" "STANDARD"))))))"STANDARD")
          )
          nil
          (progn
;;;              (princ "\n5 DIMBLK ")(princ(cdr(assoc 5 dimdef)))(princ " /= dimaro")
;;;              (princ "\n41 DIMASZ ")(princ(cdr(assoc 41 dimdef)))(princ " /= 0.125")
;;;              (princ "\nDIMSCALE ")(princ(getvar "dimscale"))(princ " /= ")(princ dimsc)
;;;              (princ "\n147 DIMGAP ")(princ(cdr(assoc 147 dimdef)))(princ " /= 0.016667")
;;;              (princ "\n43 DIMDLI ")(princ(cdr(assoc 43 dimdef)))(princ " /= 0.375")
;;;              (princ "\n44 DIMEXE ")(princ(cdr(assoc 44 dimdef)))(princ " /= 0.0625")
;;;              (princ "\n42 DIMEXO ")(princ(cdr(assoc 42 dimdef)))(princ " /= 0.0625")
;;;              (princ "\n144 DIMLFAC ")(princ(cdr(assoc 144 dimdef)))(princ " /= 1.0")
;;;              (princ "\n175 DIMSOXD ")(princ(cdr(assoc 175 dimdef)))(princ " /= 0")
;;;              (princ "\n174 DIMTIX ")(princ(cdr(assoc 174 dimdef)))(princ " /= 0")
;;;              (princ "\n73 DIMTIH ")(princ(cdr(assoc 73 dimdef)))(princ " /= 0")
;;;              (princ "\n74 DIMTOH ")(princ(cdr(assoc 74 dimdef)))(princ " /= 0")
;;;              (princ "\n77 DIMTAD ")(princ(cdr(assoc 77 dimdef)))(princ " /= 0")
;;;              (princ "\n172 DIMTOFL ")(princ(cdr(assoc 172 dimdef)))(princ " /= 1")
;;;              (princ "\n145 DIMTVP ")(princ(cdr(assoc 145 dimdef)))(princ " /= 1.25")
;;;              (princ "\nDIMASO ")(princ(getvar "dimaso"))(princ " /= 1")
;;;              (princ "\n176 DIMCLRD ")(princ(cdr(assoc 176 dimdef)))(princ " /= 1")
;;;              (princ "\n178 DIMCLRT ")(princ(cdr(assoc 178 dimdef)))(princ " /= 2")
;;;              (princ "\n177 DIMCLRE ")(princ(cdr(assoc 177 dimdef)))(princ " /= 1")
;;;              (princ "\nDIMSHO ")(princ(getvar "dimsho"))(princ " /= 1")
            (command  ".dim"
                      "dimblk"  "dimaro"
                      "dimasz"  "0.125"
;;;                      "dimscale" dimsc
                      "dimgap"  "0.016667"
                      "dimdli"  "0.375"
                      "dimexe"  "0.0625"
                      "dimexo"  "0.0625"
                      "dimlfac" "1.0"
                      "dimsoxd" "0"
                      "dimtix"  "0"
                      "dimtih"  "0"
                      "dimtoh"  "0"
                      "dimtad"  "0"
                      "dimtofl" "1"
                      "dimtvp"  "1.25"
                      "dimaso" "1"
                      "dimclrd" "BYBLOCK"
                      "dimclrt" "3"
                      "dimclre" "BYBLOCK"
                      "dimsho"  "1"
		      "dimtxsty" "STANDARD"
		      "sav"
                      "STANDARD"
                      "yes"
                      "exit"
            )
            (princ"\nDimension Style \"STANDARD\" has been updated. ")
          )
        )
  )
  (if (and (equal(getvar "dimaso") 0)(wcmatch(substr(getvar"acadver")1 2)"14"))
    (progn
      (setvar "dimaso" 1)
      (princ "\nDIMASO has been reset to 1 ")(princ)
    )
  )
  (if (and (wcmatch(substr(getvar"acadver")1 2)"15")(not(equal(getvar "dimassoc")2)))
    (progn
      (setvar "dimassoc" 2)
      (princ "\nDIMASSOC has been reset to 2 ")(princ)
    )
  )
  (if (equal(getvar "dimsho") 1) nil (setvar "dimsho" 1))
  (princ)
)